using System;
using FluentNHibernate.Automapping;
using FluentNHibernate.Automapping.Alterations;
using MvcMall.Core.Domains;

namespace MvcMall.Data.NHibernateMaps
{
    public class ArticleMap : IAutoMappingOverride<Article>
    {
        public void Override(AutoMapping<Article> mapping)
        {
            mapping.References(c => c.ArticleCategory).Column("ArticleCategoryId");
            mapping.HasMany(c => c.ArticleComments).KeyColumn("ObjectId");
        }
    }
}